package com.ghck.server.model.response;

import java.util.HashMap;
import java.util.Map;

import com.ghck.server.model.Doctor;
import com.ghck.server.model.Users;

public class DoctorRes extends Doctor{
	private static Map<Integer, String> titleMap = null;
	static{
		titleMap = new HashMap<>();
		titleMap.put(1,"主任医师");
		titleMap.put(2,"副主任医师");
		titleMap.put(3,"主治医师");
		titleMap.put(4,"住院医师");
	}
	

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	private String regionName;
	
	private String departmentName;
	
	private String hospitalName;
	
	private String titleName;

	public String getRegionName() {
		return regionName;
	}

	public void setRegionName(String regionName) {
		this.regionName = regionName;
	}

	public String getDepartmentName() {
		return departmentName;
	}

	public void setDepartmentName(String departmentName) {
		this.departmentName = departmentName;
	}

	public String getTitleName() {
		return titleName;
	}

	public void setTitleName(String titleName) {
		this.titleName = titleName;
	}
	
	
	
	public String getHospitalName() {
		return hospitalName;
	}

	public void setHospitalName(String hospitalName) {
		this.hospitalName = hospitalName;
	}

	@Override
	public void dealWith() {
		super.dealWith();
		setTitleName(titleMap.get(getTitleId()));
	}
	
	

	public void copyField(Users user){
		setId(user.getId());
		setUserId(user.getId());
		setRole(user.getRole());
		setMobile(user.getMobile());
		setPassword(user.getPassword());
		setName(user.getName());
		setHeight(user.getHeight());
		setWeight(user.getWeight());
		setBmi(user.getBmi());
		setBirthday(user.getBirthday());
		setSex(user.getSex());
		setDegree(user.getDegree());
		setJob(user.getJob());
		setAvatar(user.getAvatar());
		setRegionId(user.getRegionId());
		setAddress(user.getAddress());
		setPastHistory(user.getPastHistory());
		setMatrimony(user.getMatrimony());
		setCredits(user.getCredits());
		setInUsed(user.getInUsed());
		setIsBlock(user.getIsBlock());
		setLastModifyTime(user.getLastModifyTime());
		setCreateTime(user.getCreateTime());
	}
	
}
